package com.example.springsecuritydemo.weixinpaydemo;

import com.github.wxpay.sdk.WXPayUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;
import java.util.SortedMap;
import java.util.TreeMap;

public class SDKTest {
    public static void main(String[] args) throws Exception {
        System.out.println(new School("芜湖县实验学校").toString());
        Map<String,String> map=new HashMap<>();
        map.put("s","2");
        map.put("d","2");
        map.put("a","2");
        map.put("ad","2");
        map.put("ta","2");
//        map.put("3",new School("芜湖县实验学校").toString()+new Person("杨会君",10).toString());
        String xml = WXPayUtil.mapToXml(map);
        System.out.println(xml);

        SortedMap<String,String> map2=new TreeMap<>();
        map2.put("qw","sda");
        map2.put("qaw","sda");
        map2.put("dqw","sda");
        map2.put("qww","sda");
        for(Map.Entry<String,String> entry:map2.entrySet()){
            System.out.println(entry.getKey()+":"+entry.getValue());
        }

    }
}

@Data
@NoArgsConstructor
@AllArgsConstructor
class Person{
    private String name;
    private Integer age;
}

@Data
@NoArgsConstructor
@AllArgsConstructor
class School{
    private String name;
}
